package com.atguigu.gulimall.auth.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 *    视图映射
 * @ClassName GulimallWebConfig
 * @Description TODO
 * @Author Administrator
 * @Date 2022/7/1 21:16
 * @Version 1.0
 **/
@Configuration
public class GulimallWebConfig implements WebMvcConfigurer {


    /**
     *
     @GetMapping("/login.html")    /login.html  addViewController
     public String loginPage(){
     return "login";   login   setViewName
     }
     * @param registry
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
//        registry.addViewController("login.html").setViewName("login"); //
        registry.addViewController("reg.html").setViewName("reg");

    }
}
